import { GalGame } from "..";
import GalStore from "@/stores/modules/GalStore";
const store = GalStore();

export async function Add(data) {
    try {
        await GalGame.Add(data);
    } catch (error) {
        console.log(error);
    }
}

export async function Info() {
    try {
        const res = await GalGame.Info();
        const info = res.data.data;
        await store.Info(info);
    } catch (error) {
        console.log(error);
    }
}

export async function SearchGalInfo(data) {
    try {
        const res = await GalGame.Search(data);
        const info = res.data.data;
        await store.Info(info);
    } catch (error) {
        console.log(error);
    }
}

export async function Update(data) {
    try {
        const res = await GalGame.Update(data);
        const info = res.data.data;
        await store.Info(info);
    } catch (error) {
        console.log(error);
    }
}

export async function IsShow(data) {
    try {
        await GalGame.IsShow(data);
    } catch (error) {
        console.log(error);
    }
}

export async function SoftDel(data) {
    try {
        await GalGame.SoftDel(data);
    } catch (error) {
        console.log(error);
    }
}

export async function Del(data) {
    try {
        await GalGame.Delete(data);
    } catch (error) {
        console.log(error);
    }
}

